package com.changgou.oauth.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value = "/oauth")
public class LoginRedirect {

    /***
     * 统一跳转到登录页面展示
     * @return
     */
    @RequestMapping(value = "/login")
    public String login(String from, Model model){
        // from在网关中获得的数据,地址内容
        // 相当于哪个页面请求过来要登录的路径,然后放到model里面

        model.addAttribute("from",from );
        return "login";
    }
}